CXX         = mpiCC
RUN	    = mpirun
CLIBS       = 

EXECS       = main.x

Files.cpp    = server.cpp 3dcub.cpp main.cpp free_mas.cpp slave.cpp parallel_stuff.cpp gdcstuff.cpp
Files.o     = $(Files.cpp:.cpp=.o)

# Make sure .cc is recognized
.SUFFIXES: .o .cpp

.cpp.o:
	$(CXX) -O2 -c -I./ -o $@ $*.cpp

#main.x:  $(Files.o) ../iolib/iolib.a ../compress3d/compress3d.a Makefile
#	$(CXX) -o main.x $(Files.o) ../iolib/iolib.a ../compress3d/compress3d.a 
main.x:  $(Files.o) ../iolib/iolib.a ../sergeCompress/sergeCompress.a ../liraCompress/liraCompress.a Makefile
	$(CXX) -o main.x $(Files.o) ../iolib/iolib.a  ../sergeCompress/sergeCompress.a ../liraCompress/liraCompress.a 

run:
	$(RUN) -np 2 -machinefile machines.LINUX main.x 
#
# clean
clean:
	rm *.o $(EXECS)

